//
//  PackageTableViewCell.m
//  SheShiDu
//
//  Created by 单剑秋 on 16/6/12.
//  Copyright © 2016年 单剑秋. All rights reserved.
//

#import "PackageTableViewCell.h"

@implementation PackageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
//        self.contentView.backgroundColor = [UIColor redColor];
        
        self.backgroundColor = [UIColor colorWithRed:237 / 255.0 green:231 / 255.0 blue:227 / 255.0 alpha:1];
        
        self.oldButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_oldButton setImage:[UIImage imageNamed:@"ketang"] forState:UIControlStateNormal];
        [self.contentView addSubview:_oldButton];
        
        self.neButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_neButton setImage:[UIImage imageNamed:@"zhibo"] forState:UIControlStateNormal];
        [self.contentView addSubview:_neButton];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    _oldButton.frame = CGRectMake( 0, 0, self.contentView.frame.size.width / 2 - 0.5, self.contentView.frame.size.height);
    _neButton.frame = CGRectMake( _oldButton.frame.size.width + 1, 0, self.contentView.frame.size.width / 2 - 0.5, self.contentView.frame.size.height);
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
